package com.asset.dispoal.business.repayment.domain.db.mapper;

import com.asset.dispoal.business.casedispose.dto.CaseDisposalFileResponse;
import com.asset.dispoal.business.repayment.domain.db.entity.BsCaseRepaymentLogs;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @description:
 * @author: yf
 * @date: 2022-09-30 10:00:53
 */
@Mapper
public interface CaseRepaymentLogsMapper {
    /**
     * 单个插入
     *
     * @param bsCaseRepaymentLogs
     * @return
     */
    int insert(BsCaseRepaymentLogs bsCaseRepaymentLogs);

    /**
     * 判断当前案件是否存在正在还款审核的选项
     *
     * @param caseId
     * @return
     */
    int getTodoReviewRepayment(String caseId);

    /**
     * 根据id查询
     *
     * @param id
     * @return
     */
    BsCaseRepaymentLogs queryById(String id);

    /**
     * 数据更新
     *
     * @param repaymentLogs
     * @return
     */
    int update(BsCaseRepaymentLogs repaymentLogs);

    /**
     * 根据用户id查询用户昵称
     */
    String getNickNameByUserId(String userId);

    /**
     * 根据逾期公式id查询逾期公式名称
     *
     * @return
     */
    String getFormularNameById(String formulaId);

    /**
     * 根据id获取还款文件
     *
     * @param repaymentFileIds
     * @return
     */
    List<CaseDisposalFileResponse> queryRepaymentFileById(String repaymentFileIds);
}
